package Year21_Month10.day1023;

public class Solution1 {
    //关于翻转链表
    //首先我的思路是这个样子的
    public ListNode reverseList(ListNode head) {
        if(null == head){
            return null;
        }
        ListNode fast = head.next;
        ListNode slow = head;
        ListNode key = null;
        while(fast.next != null){
            key = slow;
            slow = fast;
            fast = fast.next;
            slow.next = key;
        }
        fast.next = slow;
        return head;
    }
}
